package com.zfzs.post.modules.post.service.impl.mybatis;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zfzs.post.model.vo.StockStateVO;
import com.zfzs.post.modules.post.domain.TerminalInfo;
import com.zfzs.post.modules.post.service.dto.TerminalInfoQueryCriteria;
import com.zfzs.post.modules.post.service.mapper.mybatis.ITerminalInfoMapper;
import com.zfzs.post.modules.post.service.mybatis.ITerminalInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 自定义终端sql
 *
 * @author: ck
 * @create: 2019/10/12/11:41
 **/
@Service("iTerminalInfoService")
public class ITerminalInfoServiceImpl extends ServiceImpl<ITerminalInfoMapper, TerminalInfo> implements ITerminalInfoService {

    @Autowired
    private ITerminalInfoMapper terminalInfoMapper;

    @Override
    public List<Map<String, Object>> findTerminalPageList(TerminalInfoQueryCriteria dto, long pageNum, int pageSize) {
        return terminalInfoMapper.findTerminalPageList(dto,pageNum,pageSize);
    }

    @Override
    public int findTerminalPageCount(TerminalInfoQueryCriteria dto) {
        return terminalInfoMapper.findTerminalPageCount(dto);
    }

    @Override
    public List<TerminalInfo> findActivatingTerminal(Long channelId) {
        return terminalInfoMapper.findActivatingTerminal(channelId);
    }

    @Override
    public List<StockStateVO> queryStockState(Long agentId, Long channelId) {
        return terminalInfoMapper.queryStockState(agentId,channelId);
    }
}
